package com.jt3g.web.controller.auth;


import com.jt3g.common.core.page.TableDataInfo;
import com.jt3g.rabbitmq.rabbitproducer.RabbitProducer;
import com.jt3g.redis.RedisUtils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/auth/test")
public class AuthController {


        @Autowired
        RedisUtil redisUtil;


        @Autowired
        private RabbitProducer producer;
        /**
         * 模态窗口
         */

        @GetMapping("/list")
        @ResponseBody
        public TableDataInfo dialog() {
                TableDataInfo tableDataInfo = new TableDataInfo();
                redisUtil.set("1212","这是一个redis的值");

                String s= redisUtil.get("1212").toString();
                System.out.println(s);
                tableDataInfo.setMsg(0);
                return tableDataInfo;
        }
        @GetMapping("/putmq")
        @ResponseBody
        public TableDataInfo putMQ() {
                TableDataInfo tableDataInfo = new TableDataInfo();
                producer.stringSend();
                tableDataInfo.setMsg(0);
                return tableDataInfo;
        }


}
